<!DOCTYPE html>
<html lang="en">
	<head>
		<title>文件重命名工具</title>
		<meta charset="UTF-8">

		<script type="text/javascript" src="../plugin/jquery-2.0.3.js"></script>
		<script type="text/javascript" src="../plugin/jquery.easing.1.3.js"></script>


		<!-- loading插件 -->
		<script type="text/javascript" src="../plugin/showLoading/js/jquery.showLoading.min.js"></script>
		<link rel="stylesheet" type="text/css" href="../plugin/showLoading/css/showLoading.css">


		<!-- 本系统用到的 -->
		<script type="text/javascript" src="../js/global.js"></script>
		<script type="text/javascript" src="../js/uiUtils.js"></script>
		<script type="text/javascript" src="../js/pFile.js"></script>
		<script type="text/javascript" src="../js/pPage.js"></script>
		<script type="text/javascript" src="../js/menuRight.js"></script>
		<script type="text/javascript" src="../js/menuTray.js"></script>
		<script type="text/javascript" src="../config/config.js"></script>

		<!-- metro ui css -->
		<script type="text/javascript" src="../plugin/metro-ui-css/min/jquery.widget.min.js"></script>
		<script type="text/javascript" src="../plugin/metro-ui-css/min/metro.min.js"></script>
		<link rel="stylesheet" type="text/css" href="../plugin/metro-ui-css/min/metro-bootstrap.min.css">
		<link rel="stylesheet" type="text/css" href="../plugin/metro-ui-css/min/metro-responsive.min.css">

		<script type="text/javascript" src="../file/file.js"></script>
		<link rel="stylesheet" type="text/css" href="../file/file.css">
	</head>
	<body class="metro" style="background-color: #333333; overflow: hidden;">
		<div class="bg-dark span13 fileContainer">

			<button class="avNumber success large" onclick="file.rename();">
				重命名
			</button>
			<button class="avNumber success large" onclick="file.toUpperCase();">
				大写
			</button>
			<button class="avNumber success large" onclick="file.toLowerCase();">
				小写
			</button>
			<button class="avNumber success large" onclick="file.extToUpperCase();">
				扩展名大写
			</button>
			<button class="avNumber success large" onclick="file.extToLowerCase();">
				扩展名小写
			</button>

			<button class="avNumber success large" onclick="file.youkuRename();">
				优酷文件重命名
			</button>
			<button class="avNumber success large" id="fileChooser">
				选择文件夹
			</button>
		</div>

		<div id="fileTableDiv" class="bg-dark span13 fileContainer" style="height: 100%;"></div>
		</div>


	</body>
</html>
<script type="text/javascript">
	file.load();
	file.createHtml();

	resizeDiv("fileTableDiv", "filePanel", "msgTable")
	$("#fileTableDiv").height($("#fileTableDiv").height() - 55);
	
	
	dirChooser($("#fileChooser"), function(dirPath) {
        log(dirPath);
        if (!dirPath) {
            return;
        }
        if (dirPath.lastIndexOf("/") != dirPath.length - 1) {
            dirPath += "/";
        }
        if (file.dirPath != dirPath) {
            file.load(dirPath);
            file.createHtml();
        }

    });
</script>